<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>角色列表</title>
    <link rel="shortcut icon" href="favicon.ico"> 
    <!-- <link th:href="@{/css/ace.min.css}" rel="stylesheet"> -->
    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet">
    <link th:href="@{/css/font-awesome.css}" rel="stylesheet">
    <link th:href="@{/css/plugins/bootstrap-table/bootstrap-table.min.css}" rel="stylesheet">
    <link th:href="@{/css/animate.css}" rel="stylesheet">
    <link th:href="@{/css/style.css}" rel="stylesheet">
    <link th:href="@{/plugins/jsTree/css/style.min.css}" rel="stylesheet" />
    <link th:href="@{/plugins/jqTreeGrid/css/jquery.treegrid.css}" rel="stylesheet" />
    <style type="text/css">
    	.b{
    		margin-bottom: 0px;
    	}
    	.fixed-table-container{
    	  padding-bottom: 80px !important;
    	}
    </style>
</head>
<body class="no-skin">
    <div class="wrapper wrapper-content animated fadeInRight">
        <!-- Panel Other -->
        <div class="ibox float-e-margins">
            <div class="ibox-content">
                <div class="row row-lg">
                    <div class="col-sm-12">
                        <div style="margin: 5px 0px 0px 0px;padding: 5px 4px;background: #e7eaec">
                         	<button class="btn btn-success  btn-sm" type="button" onclick="addMenuRoot()"><i class="fa fa-plus"></i>&nbsp;&nbsp;<span class="bold">新增</span> </button>
                        </div>
                        <div>
                             <table id="menuList" data-height="auto" data-mobile-responsive="true" style="margin-bottom: 50px"></table> 
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- End Panel Other -->
    </div>
 <div class="modal fade" id="addMenuRoot" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
        <div class="modal-dialog" style="margin-top:10%">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close"
                            data-dismiss="modal" aria-hidden="true">
                            &times;
                    </button>
                    <h4 class="modal-title" id="myModalLabels">
                      	  添加目录
                    </h4>
                </div>
	                <form class="form-horizontal" action="/sysMenu/addSysMenu" method="post" id="addMenuRootForm"  style="margin-top:10px">
		               	  <!-- 目录 type=1 -->
		               	 <input type="hidden" value="1" name="type">
		               	 <div class="modal-body">
			                    <div class="form-group">
			                    	    <label  class="col-sm-3 control-label">菜单名称:</label>
					                    <div class="col-sm-8">
					                      	 <input type="text" class="form-control" id="name" name="name" placeholder="菜单名称" value="" required="required"/>
					                    </div>
			                    </div>
			                    <div class="form-group">
			                    	    <label  class="col-sm-3 control-label">状态:</label>
					                    <div class="col-sm-8">
					                      	 <select id="status" name="status" class="form-control m-b" required="required">
														<option value="">--请选择--</option>
														<option value="1">正常</option>
														<option value="2">暂存</option>
											</select>
					                    </div>
			                    </div>
			                    <div class="form-group">
					                    <label class="col-sm-3 control-label">图标:</label>
				                        <div class="col-sm-5">
				                            <input type="text" class="form-control" id="rootIcon" name="icon" placeholder="例如:fa fa-bolt" value="" required="required"/>
				                        </div>
				                        <div class="col-sm-1">
				                             <button type="button" class="btn btn-info" onclick="selectIcon('rootIcon')" >选择图标</button>
				                        </div>
			                    </div>
			                    <div class="form-group">
			                    	    <label  class="col-sm-3 control-label">排序:</label>
					                    <div class="col-sm-8">
					                      	 <input type="number" class="form-control" id="sort" name="sort" placeholder="排序" value="" required="required"/>
					                    </div>
			                    </div>
			             </div>
			             <div class="modal-footer">
		                     <button type="button" class="btn btn-default"  data-dismiss="modal">关闭</button>
		                     <button  class="btn btn-primary" type="submit">添加</button>
		                 </div>
	                </form>
            </div>
        </div>
    </div>
    
    <div class="modal fade" id="addMenu" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
        <div class="modal-dialog" style="margin-top:10%">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close"
                            data-dismiss="modal" aria-hidden="true">
                            &times;
                    </button>
                    <h4 class="modal-title" id="myModalLabels">
                      	  添加目录
                    </h4>
                </div>
	                <form class="form-horizontal" action="/sysMenu/addSysMenu" method="post" id="addMenuForm"  style="margin-top:10px">
		               	  <!-- 目录 type=1 -->
		               	 <input type="hidden" value="2" name="type">
		               	 <input type="hidden" name="parentId" id="parentId">
		               	 <div class="modal-body">
			                    <div class="form-group">
			                    	    <label  class="col-sm-3 control-label">父菜单名称:</label>
					                    <div class="col-sm-8">
					                      	 <input type="text" class="form-control" id="parentName"  placeholder="父菜单名称" value="" disabled="disabled"/>
					                    </div>
			                    </div>
			                    <div class="form-group">
			                    	    <label  class="col-sm-3 control-label">菜单名称:</label>
					                    <div class="col-sm-8">
					                      	 <input type="text" class="form-control" id="name" name="name" placeholder="菜单名称" value="" required="required"/>
					                    </div>
			                    </div>
			                    <div class="form-group">
			                    	    <label  class="col-sm-3 control-label">菜单Url:</label>
					                    <div class="col-sm-8">
					                      	 <input type="text" class="form-control" id="url" name="url" placeholder="菜单Url" value="" required="required"/>
					                    </div>
			                    </div>
			                    <div class="form-group">
			                    	    <label  class="col-sm-3 control-label">状态:</label>
					                    <div class="col-sm-8">
					                      	 <select id="status" name="status" class="form-control m-b" required="required">
														<option value="">--请选择--</option>
														<option value="1">正常</option>
														<option value="2">暂存</option>
											</select>
					                    </div>
			                    </div>
			                    <div class="form-group">
					                    <label class="col-sm-3 control-label">图标:</label>
				                        <div class="col-sm-5">
				                            <input type="text" class="form-control" id="addMenuIcon" name="icon" placeholder="例如:fa fa-bolt" value="" required="required"/>
				                        </div>
				                        <div class="col-sm-1">
				                             <button type="button" class="btn btn-info" onclick="selectIcon('addMenuIcon')" >选择图标</button>
				                        </div>
			                    </div>
			                    <div class="form-group">
			                    	    <label  class="col-sm-3 control-label">排序:</label>
					                    <div class="col-sm-8">
					                      	 <input type="number" class="form-control" id="sort" name="sort" placeholder="排序" value="" required="required"/>
					                    </div>
			                    </div>
			             </div>
			             <div class="modal-footer">
		                     <button type="button" class="btn btn-default"  data-dismiss="modal">关闭</button>
		                     <button  class="btn btn-primary" type="submit">添加</button>
		                 </div>
	                </form>
            </div>
        </div>
    </div>
    <div class="modal fade" id="addBtn" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
        <div class="modal-dialog" style="margin-top:10%">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close"
                            data-dismiss="modal" aria-hidden="true">
                            &times;
                    </button>
                    <h4 class="modal-title" id="myModalLabels">
                      	  添加目录
                    </h4>
                </div>
	                <form class="form-horizontal" action="/sysMenu/addSysMenu" method="post" id="addBtnForm"  style="margin-top:10px">
		               	  <!-- 目录 type=1 -->
		               	 <input type="hidden" value="3" name="type">
		               	 <input type="hidden" name="parentId" id="btnParentId">
		               	 <div class="modal-body">
			                    <div class="form-group">
			                    	    <label  class="col-sm-3 control-label">父菜单名称:</label>
					                    <div class="col-sm-8">
					                      	 <input type="text" class="form-control" id="btnParentName"  placeholder="父菜单名称" value="" disabled="disabled"/>
					                    </div>
			                    </div>
			                    <div class="form-group">
			                    	    <label  class="col-sm-3 control-label">按钮名称:</label>
					                    <div class="col-sm-8">
					                      	 <input type="text" class="form-control" id="name" name="name" placeholder="按钮名称" value="" required="required"/>
					                    </div>
			                    </div>
			                    <div class="form-group">
			                    	    <label  class="col-sm-3 control-label">按钮权限代码:</label>
					                    <div class="col-sm-8">
					                      	 <input type="text" class="form-control" id="authCode" name="authCode" placeholder="按钮权限代码" value="" required="required"/>
					                    </div>
			                    </div>
			                    <div class="form-group">
			                    	    <label  class="col-sm-3 control-label">状态:</label>
					                    <div class="col-sm-8">
					                      	 <select id="status" name="status" class="form-control m-b" required="required">
														<option value="">--请选择--</option>
														<option value="1">正常</option>
														<option value="2">暂存</option>
											</select>
					                    </div>
			                    </div>
			                    <div class="form-group">
					                    <label class="col-sm-3 control-label">图标:</label>
				                        <div class="col-sm-5">
				                            <input type="text" class="form-control" id="addBtnIcon" name="icon" placeholder="例如:fa fa-bolt" value="" required="required"/>
				                        </div>
				                        <div class="col-sm-1">
				                             <button type="button" class="btn btn-info" onclick="selectIcon('addBtnIcon')" >选择图标</button>
				                        </div>
			                    </div>
			                    <div class="form-group">
			                    	    <label  class="col-sm-3 control-label">排序:</label>
					                    <div class="col-sm-8">
					                      	 <input type="number" class="form-control" id="sort" name="sort" placeholder="排序" value="" required="required"/>
					                    </div>
			                    </div>
			             </div>
			             <div class="modal-footer">
		                     <button type="button" class="btn btn-default"  data-dismiss="modal">关闭</button>
		                     <button  class="btn btn-primary" type="submit">添加</button>
		                 </div>
	                </form>
            </div>
        </div>
    </div>
     <div class="modal fade" id="editBtn" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
        <div class="modal-dialog" style="margin-top:10%">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close"
                            data-dismiss="modal" aria-hidden="true">
                            &times;
                    </button>
                    <h4 class="modal-title" id="myModalLabels">
                      	  添加目录
                    </h4>
                </div>
	                <form class="form-horizontal" action="/sysMenu/editSysMenu" method="post" id="addBtnForm"  style="margin-top:10px">
		               	  <!-- 目录 type=3 -->
		               	 <input type="hidden" id="updateBtnId" name="id">
		               	 <input type="hidden" value="3" name="type">
		               	 <input type="hidden" name="parentId" id="updateBtnParentId">
		               	 <div class="modal-body">
			                    <div class="form-group">
			                    	    <label  class="col-sm-3 control-label">父菜单名称:</label>
					                    <div class="col-sm-8">
					                      	 <input type="text" class="form-control" id="updateBtnParentName"  placeholder="父菜单名称" value="" disabled="disabled"/>
					                    </div>
			                    </div>
			                    <div class="form-group">
			                    	    <label  class="col-sm-3 control-label">按钮名称:</label>
					                    <div class="col-sm-8">
					                      	 <input type="text" class="form-control" id="updateBtnName" name="name" placeholder="按钮名称" value="" required="required"/>
					                    </div>
			                    </div>
			                    <div class="form-group">
			                    	    <label  class="col-sm-3 control-label">按钮权限代码:</label>
					                    <div class="col-sm-8">
					                      	 <input type="text" class="form-control" id="updateBtnAuthCode" name="authCode" placeholder="按钮权限代码" value="" required="required"/>
					                    </div>
			                    </div>
			                    <div class="form-group">
			                    	    <label  class="col-sm-3 control-label">状态:</label>
					                    <div class="col-sm-8">
					                      	 <select id="updateBtnStatus" name="status" class="form-control m-b" required="required">
														<option value="">--请选择--</option>
														<option value="1">正常</option>
														<option value="2">暂存</option>
											</select>
					                    </div>
			                    </div>
			                    <div class="form-group">
					                    <label class="col-sm-3 control-label">图标:</label>
				                        <div class="col-sm-5">
				                            <input type="text" class="form-control" id="updateBtnIcon" name="icon" placeholder="例如:fa fa-bolt" value="" required="required"/>
				                        </div>
				                        <div class="col-sm-1">
				                             <button type="button" class="btn btn-info" onclick="selectIcon('updateBtnIcon')" >选择图标</button>
				                        </div>
			                    </div>
			                    <div class="form-group">
			                    	    <label  class="col-sm-3 control-label">排序:</label>
					                    <div class="col-sm-8">
					                      	 <input type="number" class="form-control" id="updateBtnSort" name="sort" placeholder="排序" value="" required="required"/>
					                    </div>
			                    </div>
			             </div>
			             <div class="modal-footer">
		                     <button type="button" class="btn btn-default"  data-dismiss="modal">关闭</button>
		                     <button  class="btn btn-primary" type="submit">添加</button>
		                 </div>
	                </form>
            </div>
        </div>
    </div>
    <div class="modal fade" id="editMenu" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
        <div class="modal-dialog" style="margin-top:10%">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close"
                            data-dismiss="modal" aria-hidden="true">
                            &times;
                    </button>
                    <h4 class="modal-title" id="myModalLabels">
                      	  添加目录
                    </h4>
                </div>
	                <form class="form-horizontal" action="/sysMenu/editSysMenu" method="post" id="editMenuForm"  style="margin-top:10px">
		               	  <!-- 目录 type=1 -->
						 <input id="updateId" name="id" type="hidden">
		               	 <input type="hidden" value="2" name="type">
		               	 <input type="hidden" name="parentId" id="updateParentId">
		               	 <div class="modal-body">
			                    <div class="form-group">
			                    	    <label  class="col-sm-3 control-label">父菜单名称:</label>
					                    <div class="col-sm-8">
					                      	 <input type="text" class="form-control" id="updateParentName"  placeholder="父菜单名称" value="" disabled="disabled"/>
					                    </div>
			                    </div>
			                    <div class="form-group">
			                    	    <label  class="col-sm-3 control-label">菜单名称:</label>
					                    <div class="col-sm-8">
					                      	 <input type="text" class="form-control" id="updateName" name="name" placeholder="菜单名称" value="" required="required"/>
					                    </div>
			                    </div>
			                    <div class="form-group">
			                    	    <label  class="col-sm-3 control-label">菜单Url:</label>
					                    <div class="col-sm-8">
					                      	 <input type="text" class="form-control" id="updateUrl" name="url" placeholder="菜单Url" value="" required="required"/>
					                    </div>
			                    </div>
			                    <div class="form-group">
			                    	    <label  class="col-sm-3 control-label">状态:</label>
					                    <div class="col-sm-8">
					                      	 <select id="updateStatus" name="status" class="form-control m-b" required="required">
														<option value="">--请选择--</option>
														<option value="1">正常</option>
														<option value="2">暂存</option>
											</select>
					                    </div>
			                    </div>
			                    <div class="form-group">
					                    <label class="col-sm-3 control-label">图标:</label>
				                        <div class="col-sm-5">
				                            <input type="text" class="form-control" id="updateIcon" name="icon" placeholder="例如:fa fa-bolt" value="" required="required"/>
				                        </div>
				                        <div class="col-sm-1">
				                             <button type="button" class="btn btn-info" onclick="selectIcon('updateIcon')" >选择图标</button>
				                        </div>
			                    </div>
			                    <div class="form-group">
			                    	    <label  class="col-sm-3 control-label">排序:</label>
					                    <div class="col-sm-8">
					                      	 <input type="number" class="form-control" id="updateSort" name="sort" placeholder="排序" value="" required="required"/>
					                    </div>
			                    </div>
			             </div>
			             <div class="modal-footer">
		                     <button type="button" class="btn btn-default"  data-dismiss="modal">关闭</button>
		                     <button  class="btn btn-primary" type="submit">添加</button>
		                 </div>
	                </form>
            </div>
        </div>
    </div>
    
    <div class="modal fade" id="editRootMenu" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
        <div class="modal-dialog" >
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close"
                            data-dismiss="modal" aria-hidden="true">
                            &times;
                    </button>
                    <h4 class="modal-title" id="myModalLabels">
                      	编辑菜单
                    </h4>
                </div>
	                <form class="form-horizontal" action="/sysMenu/editSysMenu" method="post" id="editRootMenuForm"  style="margin-top:10px">
		                <div class="modal-body">
			                	<input type="hidden" name="id" id="updateRootId">  
			                    <div class="form-group">
			                    	    <label  class="col-sm-3 control-label">目录名称:</label>
					                    <div class="col-sm-8">
					                      	 <input type="text" class="form-control" id="updateRootName" name="name" placeholder="目录名称" value="" required="required"/>
					                    </div>
			                    </div>
			                    <div class="form-group">
			                    	    <label  class="col-sm-3 control-label">状态:</label>
					                    <div class="col-sm-8">
					                      	 <select id="updateRootStatus" name="status" class="form-control m-b" required="required">
														<option value="">--请选择--</option>
														<option value="1">正常</option>
														<option value="2">暂存</option>
											</select>
					                    </div>
			                    </div>
			                    <div class="form-group">
					                    <label class="col-sm-3 control-label">图标:</label>
				                        <div class="col-sm-5">
				                            <input type="text" class="form-control" id="updateRootIcon" name="icon" placeholder="例如:fa fa-bolt" value="" required="required"/>
				                        </div>
				                        <div class="col-sm-1">
				                             <button type="button" class="btn btn-info" onclick="selectIcon('updateRootIcon')" >选择图标</button>
				                        </div>
			                    </div>
			                    <div class="form-group">
			                    	    <label  class="col-sm-3 control-label">排序:</label>
					                    <div class="col-sm-8">
					                      	 <input type="number" class="form-control" id="updateRootSort" name="sort" placeholder="排序" value="" required="required"/>
					                    </div>
			                    </div>
			            </div>    
		                <div class="modal-footer">
		                    <button type="button" class="btn btn-default"  data-dismiss="modal">关闭</button>
		                    <button  class="btn btn-primary" type="submit">提交</button>
		                </div>
	                </form>
            </div>
        </div>
    </div>

    <!-- 全局js -->
    <script th:src="@{/js/jquery.min.js}"></script>
    <script th:src="@{/js/plugins/layer/layer.min.js}"></script>
    <script th:src="@{/js/plugins/layer/laydate/laydate.js}"></script>
    <script th:src="@{/js/bootstrap.min.js}"></script>
    <script th:src="@{/js/plugins/bootstrap-table/bootstrap-table.min.js}"></script>
    <script th:src="@{/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js}"></script>
    <script th:src="@{/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js}"></script>
    <!-- Peity -->
    <script th:src="@{/bootjs/menu/menuList.js}"></script>
    <script th:src="@{/bootjs/common/dateutil.js}"></script>
    <script type="text/javascript" th:src="@{/plugins/jqTreeGrid/js/jquery.treegrid.min.js}"></script>
    <script type="text/javascript" th:src="@{/plugins/jqTreeGrid/js/jquery.treegrid.bootstrap3.js}"></script>
    <script type="text/javascript" th:src="@{/plugins/jqTreeGrid/js/jquery.treegrid.extension.js}"></script>
    <script type="text/javascript" th:src="@{/plugins/jsTree/js/jstree.min.js}"></script>

</body>

</html>
